<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="if_acmpne"></a><b>if_acmpne</b> :
  jump if two object references are not equal : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitJumpInsn(int,%20org.objectweb.asm.Label)">visitJumpInsn()</a></p><dl><dt>Description</dt><dd>if_acmpne pops the top two object references off the stack and
compares them. If the two object references are not equal (i.e. if they refer
to different objects), execution branches to the address (<i xmlns="">pc</i> +
<i xmlns="">branchoffset</i>), where <i xmlns="">pc</i> is the address of the if_acmpne
opcode in the bytecode and <i xmlns="">branchoffset</i> is a 16-bit signed integer
parameter following the if_acmpne opcode in the bytecode. If the
object references refer to the same object, execution continues at the next
instruction. <br></br>If you are using Jasmin, <i xmlns="">branchoffset</i> is computed for you from the
address of &lt;label&gt;.</dd><dt>Example</dt><dd><pre>
    aload_1         ; push the object reference in local variable 1 onto stack
    aload_2         ; push the object reference in local variable 2 onto stack
    if_acmpne Label ; if the two references on the stack differ, jump to Label
    return          ; return if local variables 1 and 2 are the same object
Label:
    ; execution continues here if local variables 1 and 2 refer to the different  objects
</pre></dd><dt>Notes</dt><dd>Addresses are measured in bytes from the start of the bytecode (i.e.
address 0 is the first byte in the bytecode of the currently executing
method).</dd><dt>See also</dt><dd><a href="ref-if_icmpne.html">if_icmpne</a> <a href="ref-.html"></a> <a href="ref-if_icmplt.html">if_icmplt</a> <a href="ref-.html"></a> <a href="ref-if_icmpgt.html">if_icmpgt</a> <a href="ref-.html"></a> <a href="ref-if_icmple.html">if_icmple</a> <a href="ref-.html"></a> <a href="ref-if_icmpge.html">if_icmpge</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>value1</td>
<td>...</td></tr>
<tr>
<td>value2</td>
<td>...</td></tr>
<tr>
<td>...</td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>if_acmpne
opcode = 0xA6 (166)
</td></tr>
<tr>
<td>
s2 
</td>
<td><i>branchoffset</i></td></tr>
</table></dd></dl></body></html>